import sun.plugin.javascript.navig.Array;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.Random;

public class Task05_5 {
    public static void main(String[] args) {
        Random random=new Random();
        ArrayList arrayList=new ArrayList();
        while (arrayList.size()<10){
            int num=random.nextInt(40)+1;
            if(!arrayList.contains(num)){
                arrayList.add(num);
            }
        }
        Iterator iterator=arrayList.iterator();
                while(iterator.hasNext()){
                    System.out.println(iterator.next()+"\t");
                }
    }
}
